package src.com.foreknow.demo9;

import java.util.Scanner;

public class Person {
    //属性
    private String name;
    private int score;
    //方法
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    //出拳
    public int showFirst(){
        Scanner input = new Scanner(System.in);
        System.out.println("请出拳 1.剪刀 2.石头 3.布 （请输入相应数字：）");
        int choice = input.nextInt();
        switch (choice){
            case 1:
                System.out.println("你出拳：剪刀");
                break;
            case 2:
                System.out.println("你出拳：石头");
                break;
            case 3:
                System.out.println("你出拳：布");
                break;
        }
        return choice;
    }

//    测试方法
//    public static void main(String[] args) {
//        Person person = new Person();
//        int result = person.showFirst();
//        System.out.println(result);
//    }



}



















